package com.rajeshDyadav.serialization;

import java.io.Serializable;

public class Employee extends Department implements Serializable {
    private static final long serialVersionUID = 1L;
    public String name;
    public String address;
    public transient int SSN;
    public int number;

    public void mailCheck() {
	System.out.println("Mailing a check to " + name + " " + address);
    }
}

//class EmployeeBean implements Cloneable {
//    private String name;
//
//    private String designation;
//
//    public EmployeeBean() {
//	this.setDesignation("Programmer");
//    }
//
//    public String getDesignation() {
//	return designation;
//    }
//
//    public void setDesignation(String designation) {
//	this.designation = designation;
//    }
//
//    public String getName() {
//	return name;
//    }
//
//    public void setName(String name) {
//	this.name = name;
//    }
//
//    public Object clone() throws CloneNotSupportedException {
//	/*
//	 * Employee copyObj = new Employee();
//	 *  copyObj.setDesignation(this.designation);
//	 *  copyObj.setName(this.name);  return copyObj;  
//	 */
//	return super.clone();
//    }
//}
//
//public class Employee {
//    public static void main(String arg[]) {
//	EmployeeBean jwz = new EmployeeBean();
//	jwz.setName("Jamie Zawinski");
//	try {
//	    EmployeeBean joel = (EmployeeBean) jwz.clone();
//	    System.out.println(joel.getName());
//	    System.out.println(joel.getDesignation());
//	} catch (CloneNotSupportedException cnse) {
//	    System.out.println("Cloneable should be implemented. " + cnse);
//	}
//    }
//}